package com.wanbang.service.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wanbang.dao.GoodsDao;
import com.wanbang.dao.ShoppingCarDao;
import com.wanbang.entities.Goods;
import com.wanbang.entities.ShoppingCar;
import com.wanbang.service.ShoppingCarService;
@Service
public class ShoppingCarServiceImp implements ShoppingCarService {
	@Autowired
	private ShoppingCarDao shoppingCarDao;
	@Override
	public List<ShoppingCar> selectShoppingCarByUserId(Integer userId) {
		
		return shoppingCarDao.selectShoppingCarByUserId(userId);
	}
	@Autowired
	private GoodsDao goodsDao;
	public Goods selelctGoodsByGoodsId(Integer goodsId) {
		   return goodsDao.selelctGoodsByGoodsId(goodsId);
		
	}
	@Override
	public Double selectShoppingCarSum(Integer userId) {
		return shoppingCarDao.selectShoppingCarSum(userId);
	}

}
